package com.yiwyn.springhotprod.service;

import com.yiwyn.springhotprod.common.BaseConstant;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class HotService {


    @Autowired
    private ConfigurableApplicationContext applicationContext;


    public Object test() {
        log.info("测试:{}", BaseConstant.SUCCESS_CODE);

        TestService bean = applicationContext.getBean(TestService.class);
        String s = bean.test2();
        return "test hot-service update:" + s;
    }

}
